<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>无标题文档</title>
    <script>
    //instanceof : 对象与构造函数在原型链上是否有关系

    function Phone() {}

    var mi = new Phone();
    

    console.log(mi instanceof Object); //true
    console.log(mi instanceof Array); //false
    console.log(mi instanceof Function); //false
    console.log(mi instanceof Phone); //true
    console.log(Object.__proto__);
    console.log(Function.__proto__);
    
    // 实例对象的隐式原型链
    console.log('实例对象指向Phone.prototype:',mi.__proto__);
    console.log('Phone.prototype指向Object.prototype:',mi.__proto__.__proto__);
    console.log('Objec.prototype指向null:',mi.__proto__.__proto__.__proto__);
    // 构造函数的隐式原型链
    console.log('Phone.__proto__指向Function.prototype',Phone.__proto__);
    console.log('Function.prototype指向Object.prototype',Phone.__proto__.__proto__);
    console.log('Object.prototype指向null',Phone.__proto__.__proto__.__proto__);

    var obj = new Object();
    // 一般创建对象的原型链
    console.log('创建对象的__proto__',obj.__proto__);
    console.log('Object.prototype指向null',obj.__proto__.__proto__);

    function Object(){

    }
    console.log('指向Function.prototype',Object.__proto__);
    console.log('Object.prototype',Object.__proto__.__proto__);
    function Function(){

    }
    console.log(Function.__proto__);
     console.log('Object.prototype',Function.__proto__.__proto__);
    </script>
</head>

<body>	
</body>

</html>